package com.example.sharpshopdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sharpshopdemo.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {


        // 自定义模糊查询方法
        @Select("SELECT * FROM role WHERE name LIKE CONCAT('%', #{keyword}, '%')")
        List<Role> selectRolesByNameLike(@Param("keyword") String keyword);

}
